module.exports = {
  title: 'Homebrew',
  description: 'Homebrew国内源（中科大）一键安装脚本使用说明',
  smoothScroll: true,
  displayAllHeaders: true,
  base: '/brew/',
  themeConfig: {
    logo: '/images/homebrew.png',
    lastUpdated: '最后更新时间',
    displayAllHeaders: true,
    nav: [
      { text: '指南', link: '/guide/' },
      { text: '其他文档', link: '/other/' },
      { text: 'Gitee', link: 'https://gitee.com/wejectchan/brew' },
      { text: 'LookArm(查找支持m1芯片的App)', link: 'https://lookarm.cn' },
    ],
    sidebar: {
      '/guide/': getGuideBar('基础', '深入'),
      '/other/': ['', 'zsh'],
    },
    sidebarDepth: 2,
  },
  plugins: [
    [
      'vuepress-plugin-code-copy',
      {
        align: 'top',
        color: '#FCFCFC',
        // backgroundTransition: Boolean,
        // backgroundColor: String,
        successText: '已复制',
      },
    ],
  ],
}

function getGuideBar(A, B) {
  return [
    {
      title: A,
      collapsable: false,
      children: [''],
    },
    {
      title: B,
      collapsable: false,
      children: ['usage'],
    },
  ]
}
